home *** CD-ROM | disk | FTP | other *** search
/ Mission to McDonaldLand / Mission To McDonaldLand.iso / code.cst / 00004_Script_INSIDELEFT < prev    next >
Text File  |  1998-10-29  |  5KB  |  139 lines

  1. on enterFrame
  2.   global heading
  3.   global move
  4.   global updown
  5.   global silly
  6.   global silly2
  7.   global nomore
  8.   global CStop
  9.   global castrestore
  10.   global restoration
  11.   
  12.   if CStop = 1 then 
  13.     if the mouseH < the locH of sprite 30 then set the member of sprite 30 = "Left"
  14.     if the mouseH > the locH of sprite 30 then set the member of sprite 30 = "Right"
  15.     abort
  16.   end if
  17.   
  18.   if silly > 0 then abort
  19.   if silly2 > 0 then abort
  20.   
  21.   if the mouseV < 270 or the mouseH > the locH of sprite 30 - 20 and the mouseH < the locH of sprite 30 + 20 then
  22.     if heading = 1 then set the member of sprite 30 = "Left"
  23.     if heading = 2 then set the member of sprite 30 = "Right"
  24.     set move = 0
  25.   end if
  26.   
  27.   if the mouseH > the locH of sprite 30 + 19 and the mouseV > 270 then 
  28.     set the member of sprite 30 = "Walk Right"
  29.     set heading = 2
  30.     set move = 1
  31.     set the locH of sprite 30 = the locH of sprite 30 + 15
  32.   end if
  33.   
  34.   if the mouseH < the locH of sprite 30 - 19 and the mouseV > 270 then 
  35.     set the member of sprite 30 = "Walk Left"
  36.     set heading = 1
  37.     set move = 1
  38.     set the locH of sprite 30 = the locH of sprite 30 - 15
  39.   end if
  40.   
  41.   if the mouseV > the locV of sprite 30 and the mouseV < the locV of sprite 30 + 50 then 
  42.     if move = 0 and heading = 1 then set the member of sprite 30 = "Left"
  43.     if move = 0 and heading = 2 then set the member of sprite 30 = "Right"
  44.     set updown = 0
  45.   end if
  46.   
  47.   if the mouseV < the locV of sprite 30 then 
  48.     if the locV of sprite 30 > 300 then
  49.       if move = 0 and heading = 1 then set the member of sprite 30 = "Walk Left"
  50.       if move = 0 and heading = 2 then set the member of sprite 30 = "Walk Right"
  51.       set the locV of sprite 30 = the locV of sprite 30 - 5
  52.       set updown = 1
  53.     end if
  54.   end if
  55.   
  56.   if the mouseV > the locV of sprite 30 + 50 then 
  57.     if the locV of sprite 30 < 350 then
  58.       if move = 0 and heading = 1 then set the member of sprite 30 = "Walk Left"
  59.       if move = 0 and heading = 2 then set the member of sprite 30 = "Walk Right"
  60.       set the locV of sprite 30 = the locV of sprite 30 + 5
  61.       set updown = 1
  62.     end if
  63.   end if
  64.   
  65.   if the locH of sprite 30 > 600 then 
  66.     set the locH of sprite 30 = 50
  67.     set the member of sprite 30 = "blank"
  68.     set nomore = 0
  69.     set castrestore = 0
  70.     set restoration = 0
  71.     puppetTransition 11, 1, 30, TRUE
  72.     go next
  73.     set the member of sprite 30 = "Walk Right"
  74.   end if
  75.   
  76.   if the locH of sprite 30 < 100 then 
  77.     if updown = 0 then set the member of sprite 30 = "Left"
  78.     set the locH of sprite 30 = 100
  79.   end if
  80.   
  81. end
  82.  
  83. on rightMouseDown
  84.   global silly
  85.   global silly2
  86.   global heading
  87.   global CStop
  88.   if CStop = 1 then abort
  89.   if the mouseH > the locH of sprite 30 - 60 and the mouseH < the locH of sprite 30 + 60 and silly < 1 then 
  90.     if heading = 1 then 
  91.       set the locH of sprite 30 = the locH of sprite 30 + 16
  92.       set the locV of sprite 30 = the locV of sprite 30 - 14
  93.       set the member of sprite 30 = "backflipL"
  94.     end if
  95.     if heading = 2 then 
  96.       set the locH of sprite 30 = the locH of sprite 30 - 16
  97.       set the locV of sprite 30 = the locV of sprite 30 - 14
  98.       set the member of sprite 30 = "backflipR"
  99.     end if
  100.     set silly = 1
  101.   end if
  102.   
  103.   if silly2 < 1 and (the mouseH < the locH of sprite 30 - 60 or the mouseH > the locH of sprite 30 + 60) then
  104.     if the locH of sprite 30 > 200 or heading = 2 then
  105.       set silly2 = 1
  106.       set the locV of sprite 30 = the locV of sprite 30 - 15
  107.       if heading = 2 then set the member of sprite 30 = "cartwheelR"
  108.       if heading = 1 then set the member of sprite 30 = "cartwheelL"
  109.     end if
  110.   end if
  111.   
  112. end
  113.  
  114.  
  115. on exitFrame
  116.   global silly
  117.   global silly2
  118.   global heading
  119.   if silly > 0 then set silly = silly + 1
  120.   if silly > 12 then
  121.     set silly = 0
  122.     if heading = 1 then set the locH of sprite 30 = the locH of sprite 30 + 50
  123.     if heading = 2 then set the locH of sprite 30 = the locH of sprite 30 - 50
  124.     set the locV of sprite 30 = the locV of sprite 30 + 14
  125.   end if
  126.   if silly2 > 0 then
  127.     if heading = 2 then set the locH of sprite 30 = the locH of sprite 30 + 20
  128.     if heading = 1 then set the locH of sprite 30 = the locH of sprite 30 - 20
  129.     set silly2 = silly2 + 1
  130.   end if
  131.   
  132.   if silly2 > 10 then 
  133.     set silly2 = 0
  134.     set the locV of sprite 30 = the locV of sprite 30 + 15
  135.   end if
  136.   
  137.   go the frame
  138. end
  139.